<template>
  <div class="card">
    <h2>具名插槽</h2>
    <div class="title">
      <slot name="title">默认标题文字</slot>
    </div>
    <div class="box-content">
      <slot name="content">默认内容</slot>
    </div>
  </div>
</template>

<script setup></script>

<style lang="scss" scoped>
.card {
  background-color: rgb(98, 199, 249);
  border-radius: 10px;
  padding: 10px;
  width: 200px;
  height: 300px;

  .title {
    background-color: rgba(242, 123, 123, 0.333);
    text-align: center;
  }
}
</style>
